<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>直播室</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/reset.css" />
		<link rel="stylesheet" href="../css/mui.min.css">
		<script type="text/javascript" src="../js/lib/remtest.js"></script>
		<link rel="stylesheet" href="../css/liveapp.css" />
		<script type="text/javascript" src="../js/iconfont.js"></script>
		<style type="text/css">
			html,
			body {
				background: #FFFFFF;
			}
			
			.mui-bar~.mui-content .mui-fullscreen {
				top: 44px;
				height: auto;
			}
			
			.iconzs {
				width: 0.38rem !important;
				height: 0.38rem !important;
				font-size: 0.38rem;
				fill: currentColor;
				overflow: hidden;
			}
			/*头部*/
			
			.mui-bar {
				background-color: #313131;
				height: 0.67rem;
			}
			
			.mui-bar h1 {
				color: #FFFFFF;
				font-size: 0.3rem;
				line-height: 0.67rem;
			}
			
			.title {
				margin: 20px 15px 10px;
				color: #6d6d72;
				font-size: 15px;
			}
			
			.oa-contact-cell.mui-table .mui-table-cell {
				padding: 11px 0;
				vertical-align: middle;
			}
			
			.oa-contact-cell {
				position: relative;
				margin: -11px 0;
			}
			
			.oa-contact-avatar {
				width: 75px;
			}
			
			.oa-contact-avatar img {
				border-radius: 50%;
			}
			
			.oa-contact-content {
				width: 100%;
			}
			
			.oa-contact-name {
				margin-right: 20px;
			}
			
			.oa-contact-name,
			oa-contact-position {
				float: left;
			}
			
			.mui-card:last-child{
				padding-bottom: 0.2rem;
			}
			
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">

			<h1 class="mui-title">直播</h1>

		</header>

		<div class="mui-content">

		</div>

		<!--模板-->
		<div id="model" style="display: none;">
			<div class="mui-card">
				<div class="mui-card-content" style="position: relative;">
					<div class="mui-card-content-inner">

						<div class="bctz">
							${cb:status}
							<!--<i class="dd live_ing"></i>即将播出-->
						</div>

						<img src="${img_url}" width="100%">

						<div class="mui-row">
							<div class="mui-col-sm-8 mui-col-xs-8" style="width: 3.53rem !important;">
								<ul class="liveul">
									<li>
										<h4 class="bigtit">${cb:title}<span class="mui-icon">
		                    	
		                    	<svg class="iconzs" >
 									 <use xlink:href="#icon-zhibo-VIP"></use>
								</svg>
		                    	
		                    </span></h4></li>
									<p style="border-bottom: 1px dashed #CCCCCC; width:1.35rem"></p>
									<li>
										<h5 class="bigtita">中诚黄金分析师</h5></li>
									<li>
										<h5 class="bigtitb">${zbSubject}</h5></li>
								</ul>
							</div>
							<div class="mui-col-sm-4 mui-col-xs-4" style="width: 2.15rem !important;">
								<ul class="liveula">
									<li>
										<h6 class="bigtitc">${zbTime}</h6></li>
									<li>

										<button class="jrbut" onclick="openWindowWithTitle('sub.html?url=${link_url}','${title}')">进入</button>
									</li>

								</ul>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
		<!--模板end-->
	</body>

	<script src="../js/mui.min.js"></script>
	<script type="text/javascript" src="../js/Common.js"></script>
	<script type="text/javascript" src="../js/lib/template.js"></script>

	<script>
		mui.init({
			swipeBack: true //启用右滑关闭功能
		});
		var t = document.getElementById('model').innerHTML;
		GetList();
		setInterval(GetList,120000);
		function GetList(){
			mui.getJSON('http://www.99990158.com/ajax/GetLive.aspx', {
			page: 1,
			size: 10,
			cid: 107,
			channel: 'zbRoom',
			status: 0

		}, function(res) {
			 

			//加载数据 参数解释(模板，数据数量，回调函数[可以不传])；

			var res = tmpl(t, res.data, tmpl_count(res.data), tmpCallBack);

			document.querySelector('.mui-content').innerHTML = res;

		}); 
		}

		function tmpCallBack(a, b) {

			switch(b[1]) {
				case "title":
				 
					return substrC(a.title, 20);
					break;
				case "status":
				 	 
					if(a.isLive == 1) {
						return '<i class="dd live_ing"></i>正在直播';
					} else {
						return '<i class="dd live_noing"></i>即将播出';

					}
					break;
				default:

					break;
			}
			return '';
		}
	</script>

</html>